.collections-list-container {
  width: 100%;
  height: inherit;
  padding: 0px 0px 8px 0;
  flex: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  &.selection-enabled {
    padding-bottom: 50px;
  }

  .collection-panel.active {
    & > .ant-collapse-header {
      background: var(--requestly-color-white-t-20);
      box-shadow: inset 2px 0px 0px 0px var(--requestly-color-primary);
      transition: unset;

      &:hover {
        background: var(--requestly-color-white-t-20) !important;
      }
    }
  }

  .collections-list-header {
    display: flex;
    align-items: center;
    padding: 8px;

    .create-collection-btn {
      margin-left: auto;
    }
  }

  .collections-list-content {
    overflow: auto;
    padding: 0 8px;

    .collections-list {
      display: flex;
      flex-direction: column;
    }

    .ant-collapse-expand-icon {
      display: flex;
      align-items: center;
      .ant-checkbox-wrapper {
        margin-right: 4px;
      }
    }

    .ant-checkbox-wrapper {
      margin-right: 2px;

      .ant-checkbox-input {
        width: 13px;
        height: 13px;
      }

      .ant-checkbox-inner {
        width: 13px;
        height: 13px;
        border: 1px solid var(--requestly-color-white-t-20);

        &::after {
          width: 4px;
          height: 7px;
        }
      }
    }

    .request-row {
      display: flex;
      align-items: center;

      a {
        width: 100%;
      }
    }

    .collection-row {
      display: flex;
      align-items: start;
    }

    .empty-state-wrapper {
      margin: 2px 0;
    }

    .collections-list-item {
      width: 100%;
      display: flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      padding: 2px 6px;
      border-radius: 4px;
      color: var(--requestly-color-text-subtle);
      font-size: var(--requestly-font-size-sm, 13px);
      min-height: 26px;
      margin-top: 2px;

      &.api {
        height: 28px;
        padding: var(--space-2, 4px);

        .ant-checkbox-wrapper {
          margin-left: 2px;
        }

        .request-method {
          flex-shrink: 0;
          font-size: 8px;
          font-weight: var(--requestly-font-weight-medium);
          line-height: 13px;
          letter-spacing: 0.5px;
          text-transform: uppercase;
          display: flex;
          width: 32px;
          justify-content: center;
          align-items: center;
          border-radius: 2px;
        }

        .request-url {
          overflow: hidden;
          white-space: nowrap;
          text-overflow: ellipsis;
          font-size: var(--requestly-font-size-sm, 12px);
          color: var(--requestly-color-text-default);
        }
        .request-options {
          margin-left: auto;
          display: none;
        }

        &:hover .request-options {
          display: block;
        }

        &:hover,
        &.active {
          background: var(--requestly-color-surface-1);
        }

        &:hover {
          background: var(--requestly-color-white-t-10);
        }

        &.active {
          background: var(--requestly-color-white-t-20);
          box-shadow: inset 2px 0px 0px 0px var(--requestly-color-primary);
        }
      }

      .collection-checkbox-container {
        margin-left: 1px;
      }

      .ant-checkbox {
        top: 2px;
      }

      &.collection.ant-collapse {
        padding: 0;

        &:hover .ant-collapse-item .ant-collapse-header .collection-name-container .visible {
          visibility: visible;
        }
      }

      .ant-collapse-item {
        width: 100%;

        .ant-collapse-header {
          height: 28px;
          color: var(--requestly-color-text-default);
        }

        &.ant-collapse-item-active {
          .ant-collapse-header {
            color: var(--requestly-color-text-default);
          }
        }

        .ant-collapse-header {
          padding: 2px 4px;
          border-radius: 4px;
          user-select: none;
          display: flex;
          align-items: center;
          gap: 8px;
          color: var(--requestly-color-text-subtle);

          &-text {
            overflow: hidden;
          }

          &:hover {
            background: var(--requestly-color-white-t-10);
          }

          .ant-collapse-expand-icon {
            cursor: pointer;

            svg {
              width: 18px;
              height: 18px;
              padding: 3px;
              color: inherit;
              margin: 0;
            }

            .collection-expand-icon {
              &:hover {
                background: var(--requestly-color-white-t-20);
                border-radius: 4px;
              }
            }
          }

          .ant-collapse-header-text {
            flex: auto;
          }

          .collection-name-container {
            display: flex;
            align-items: center;
            justify-content: space-between;
          }

          .collection-name {
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            font-style: normal;
            font-size: var(--requestly-font-size-sm, 12px);
            font-weight: var(--requestly-font-weight-medium);
            font-weight: var(--requestly-font-weight-normal);
            line-height: var(--line-height-xs, 15px);
          }

          .collection-options {
            flex-shrink: 0;
            margin-left: auto;
            align-items: center;
            gap: var(--space-1, 2px);
            display: none;

            svg {
              color: var(--requestly-color-text-subtle);
            }

            &:hover,
            &.active {
              display: flex;
            }
          }
        }

        .ant-collapse-content-box {
          margin-left: 6px;
          padding: 2px 0px 0px 6px;
          border-left: 1px solid var(--requestly-color-white-t-10, rgba(255, 255, 255, 0.12));

          &:hover {
            border-left: 1px solid var(--requestly-color-white-t-20, rgba(255, 255, 255, 0.12));
          }
        }
      }
    }
  }
}

.collections-list-container.selection-enabled {
  .collections-list-item {
    transition: all 0.15s ease;
    cursor: pointer;

    &:not(.selected):hover {
      background-color: rgba(255, 255, 255, 0.05);
    }
  }

  .ant-checkbox-wrapper {
    transition: opacity 0.15s ease;
  }
}
